package auction.bbs.action;

import java.io.IOException;

import auction.bbs.dao.BbsDao;
import auction.bbs.dto.BbsDTO;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import com.opensymphony.xwork2.Preparable;

public class ModifyAction extends ActionSupport implements Preparable, ModelDriven{
	private BbsDTO resultDTO;
	private int seq;
	private BbsDao dao;
	
	
	
	public ModifyAction() throws IOException{
		dao = BbsDao.getinstance();
	}
	
	public String execute()throws Exception{
		dao.insert(resultDTO);
		return SUCCESS;
	}
	
	
	
	
	
	public int getSeq() {
		return seq;
	}
	public void setSeq(int seq) {
		this.seq = seq;
	}
	@Override
	public Object getModel() {return resultDTO;}
	@Override
	public void prepare() throws Exception {resultDTO = new BbsDTO();}
	
}
